﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace ExcellentProjectPlus.Dominio.Core
{
    public interface IRepositorio<TEntity>
     where TEntity : class
    {
        void Agregar(System.Collections.Generic.List<TEntity> entidades);
        void Agregar(TEntity entidad);
        void Eliminar(System.Collections.Generic.List<TEntity> entidades);
        void Eliminar(object id);
        void Eliminar(object[] ids);
        void Eliminar(TEntity entidad);
        void Modificar(System.Collections.Generic.List<TEntity> items);
        void Modificar(TEntity entidad);
        IEnumerable<TEntity> Obtener(Expression<Func<TEntity, bool>> filter = null, Func<IQueryable<TEntity>, 
            IOrderedQueryable<TEntity>> orderBy = null, string includeProperties = "", int? pageSize = null, int? page = null);

        IQueryable<TEntity> ObtenerConsulta(Expression<Func<TEntity, bool>> filter = null, Func<IQueryable<TEntity>,
            IOrderedQueryable<TEntity>> orderBy = null, string includeProperties = "", int? pageSize = null, int? page = null);

        TEntity ObtenerPorId(object id);
        TEntity ObtenerPorId(object[] ids);
    }
}
